package cn.hansfly.question;

public class MyException {
	
	int division(int a, int b) throws ArithmeticException {
		try {
			return a / b;
		} catch (ArithmeticException e) {
			throw e;
		}
	}

	int fn1(int a, int b) throws ArithmeticException {
		return division(a, b);
	}
	
	
	public static void main(String[] args) {
		MyException excep = new MyException();

		try {
			excep.fn1(5, 0);
			System.out.println("Exception");
		} catch (ArithmeticException ex) {
			System.out.println(ex.toString());
			return;
		} catch (Exception e) {
			System.out.println(e.toString());
		} finally {
			System.out.println("finally");
		}

		System.out.println("finish");
	}
}

